import request from '@/api/socialized-servce/index.js' //引入http.js
const api = request

export default {
	// 获取绑定主体列表 分页
	queryPageByCondition(params){
		let url = 'system/partyUser/queryPageByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取绑定主体列表
	queryByCondition(params){
		let url = 'system/partyUser/queryByCondition'
		return api.request(url,'post',{
			...params
		})
	},
	// 获取会员列表 分页
	queryEntryInfo(params){
		let url = 'system/partyUser/queryEntryInfo'
		return api.request(url,'get',{
			...params
		})
	},
	// 修改默认主体
	updateStatus(params){
		let url = 'system/partyUser/changeDefLogin'
		return api.request(url,'post',{
			...params
		})
	},
	// 添加
	add(params) {
		let url = 'system/partyUser/bind'
		return api.request(url, 'post', params)
	},
	// 修改
	edit(params) {
		let url = 'system/partyUser/edit'
		return api.request(url, 'put', params)
	},
	// 修改
	del(params) {
		let url = `system/partyUser/del?id=${params.id}`
		return api.request(url, 'DELETE', params)
	},
	// 获取当前系统用户
	queryPartyUserByCondition(params) {
		let url = 'system/partyUser/queryByCondition'
		return api.request(url, 'post', params)
	},
	// 主体获取邀请码
	queryByInviteCode(params) {
		let url = `system/organization/queryByInviteCode?inviteCode=${params.inviteCode}`
		return api.request(url, 'get', params)
	},
	getLoginUser(params) {
		let url = 'system/user/getCurrentUserInfo?partyType=' + params.partyType + '&partyNo=' + params.partyNo
		return api.request(url, 'get', params)
	},

	// 获取会员详情
	queryById(params) {
		let url = 'system/partyUser/queryById'
		return api.request(url, 'get', params)
	}
}